﻿package mlc.haxe.output;
import haxe.PosInfos;

/**
 * An output handler. Output handlers handle the information that is outputted by a console.
 */
interface ConsoleOutputHandler {
	/**
	 * Clears the output. The user might not be able to access the information that was written prior to calling this method.
	 * However, this is not guaranteed, as it depends on the implementation.
	 */
	public function clearOutput():Void;
	/**
	 * Writes a string, preferably in the specified color. Whether the provided color is actually used or not depends on the
	 * implementation.
	 */
	public function writeAdvancedString(value:String, color:Int, breakline:Bool):Void;
	/**
	 * Writes a boolean value.
	 */
	public function writeBool(value:Bool, positionInformation:PosInfos):Void;
	/**
	 * Writes a floating point.
	 */
	public function writeFloat(value:Float, positionInformation:PosInfos):Void;
	/**
	 * Writes an integer.
	 */
	public function writeInt(value:Int, positionInformation:PosInfos):Void;
	/**
	 * Writes a null value.
	 */
	public function writeNull(positionInformation:PosInfos):Void;
	/**
	 * Writes a string.
	 */
	public function writeString(value:String, positionInformation:PosInfos):Void;
	/**
	 * Writes some XML.
	 */
	public function writeXml(value:Xml, positionInformation:PosInfos):Void;
}